package com.huawang.mdesign.model.service.request;

import com.huawang.business.constants.ParamErrorConstants;
import com.huawang.business.dto.ProjectIdDTO;
import com.huawang.mdesign.model.service.config.validation.ValidGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class ModifyPropertyByValueSpecificationDTO extends ProjectIdDTO {

    @NotBlank(message = ParamErrorConstants.NO_PROJECT_ID)
    private String projectId;

    @NotBlank(groups = ValidGroup.CreateValueSpecification.TypeId.class, message = ParamErrorConstants.NO_METACLASS)
    @Schema(title = "模型类型")
    private String metaclass;

    @Schema(title = "已存在valueSpecification的模型id")
    private String valueSpecificationId;

    @Schema(title = "需要设置的valueSpecification的值")
    private Object value;

    @Schema(title = "附加值")
    private String extraValue;

    @Schema(title = "valueSpecification的父模型id")
    @NotBlank(message = ParamErrorConstants.NO_INSTANCE_ID)
    private String instanceId;

    @Schema(title = "属性唯一标识")
    @NotBlank(message = ParamErrorConstants.NO_KEYS)
    private String key;

}
